package exttable.userdefineextendsclasses;

import exttable.SGTTestParametrs;

import javax.swing.*;

/**
 * Created by IntelliJ IDEA.
 * User: ADMIN
 * Date: 18.08.11
 * Time: 15:16
 * To change this template use File | Settings | File Templates.
 */
public class UserDefineJMenuItem extends JMenuItem{
    int accessLevel;

    private int getAccessLevel() {
        return accessLevel;
    }

    private void setAccessLevel(int accessLevel) {
        this.accessLevel = accessLevel;
    }

    public UserDefineJMenuItem(String s, int accessLevel){
        super(s);
        this.accessLevel=accessLevel;
    }

    @Override
    public boolean isVisible() {
        return SGTTestParametrs.getInstance().getUserAccessLevel() >= accessLevel;
    }
}
